<template>
  <!-- 图片放大 -->
  <div class="pic_container" @click="haldleClose">
    <div class="img-box">
      <img :src="actPhotos" id="box" alt="" />
    </div>
  </div>
</template>

<script setup>
import { defineEmits } from 'vue';
const props = defineProps({
  actPhotos: {
    type: String,
    default: '',
  },
});

const emit = defineEmits(['closeModel']);

const haldleClose = () => {
  emit('closeModel');
};
</script>

<style scoped lang="scss">
.pic_container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 80%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.img-box {
  width: 80%;
  height: 80%;
  margin: auto;
  object-fit: contain;
  border-radius: 10px;
  overflow: hidden;
}

img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
</style>
